﻿using Dyao.Book.Entity;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Dyao.Book.Repository
{
    public class TaskCenterRecordEntityTypeConfiguration : IEntityTypeConfiguration<TaskCenterRecordEntity>
    {
        public void Configure(EntityTypeBuilder<TaskCenterRecordEntity> builder)
        {
            builder.Property(a => a.Category).HasEnumToIntConversion();
            builder.Property(a => a.IsTimeOut).HasBoolToStringConversion();
            builder.Property(a => a.Status).HasEnumToIntConversion();
            builder.Property(a => a.IsDel).HasBoolToStringConversion();
        }
    }
}
